package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusChannelRealtimeValueMapper;
import com.ruoyi.business.domain.BusChannelRealtimeValue;
import com.ruoyi.business.service.IBusChannelRealtimeValueService;

/**
 * 通道硬件实时值记录表Service业务层处理
 * 
 * @author asher
 * @date 2021-11-02
 */
@Service
public class BusChannelRealtimeValueServiceImpl implements IBusChannelRealtimeValueService 
{
    @Autowired
    private BusChannelRealtimeValueMapper busChannelRealtimeValueMapper;

    /**
     * 查询通道硬件实时值记录表
     * 
     * @param recordId 通道硬件实时值记录表主键
     * @return 通道硬件实时值记录表
     */
    @Override
    public BusChannelRealtimeValue selectBusChannelRealtimeValueByRecordId(Long recordId)
    {
        return busChannelRealtimeValueMapper.selectBusChannelRealtimeValueByRecordId(recordId);
    }

    /**
     * 查询通道硬件实时值记录表列表
     * 
     * @param busChannelRealtimeValue 通道硬件实时值记录表
     * @return 通道硬件实时值记录表
     */
    @Override
    public List<BusChannelRealtimeValue> selectBusChannelRealtimeValueList(BusChannelRealtimeValue busChannelRealtimeValue)
    {
        return busChannelRealtimeValueMapper.selectBusChannelRealtimeValueList(busChannelRealtimeValue);
    }

    /**
     * 新增通道硬件实时值记录表
     * 
     * @param busChannelRealtimeValue 通道硬件实时值记录表
     * @return 结果
     */
    @Override
    public int insertBusChannelRealtimeValue(BusChannelRealtimeValue busChannelRealtimeValue)
    {
        busChannelRealtimeValue.setCreateTime(DateUtils.getNowDate());
        return busChannelRealtimeValueMapper.insertBusChannelRealtimeValue(busChannelRealtimeValue);
    }

    /**
     * 修改通道硬件实时值记录表
     * 
     * @param busChannelRealtimeValue 通道硬件实时值记录表
     * @return 结果
     */
    @Override
    public int updateBusChannelRealtimeValue(BusChannelRealtimeValue busChannelRealtimeValue)
    {
        busChannelRealtimeValue.setUpdateTime(DateUtils.getNowDate());
        return busChannelRealtimeValueMapper.updateBusChannelRealtimeValue(busChannelRealtimeValue);
    }

    /**
     * 批量删除通道硬件实时值记录表
     * 
     * @param recordIds 需要删除的通道硬件实时值记录表主键
     * @return 结果
     */
    @Override
    public int deleteBusChannelRealtimeValueByRecordIds(Long[] recordIds)
    {
        return busChannelRealtimeValueMapper.deleteBusChannelRealtimeValueByRecordIds(recordIds);
    }

    /**
     * 删除通道硬件实时值记录表信息
     * 
     * @param recordId 通道硬件实时值记录表主键
     * @return 结果
     */
    @Override
    public int deleteBusChannelRealtimeValueByRecordId(Long recordId)
    {
        return busChannelRealtimeValueMapper.deleteBusChannelRealtimeValueByRecordId(recordId);
    }
}
